#ifndef ACCOUNTDIALOG_H
#define ACCOUNTDIALOG_H

#include <QDialog>

#include "mainwindow.h"

#include "icysettings.h"
#include "icybuddy.h"

namespace Ui {
    class AccountDialog;
}

class AccountDialog : public QDialog {
    Q_OBJECT
    public:
        AccountDialog(QWidget *parent = 0, IcySettings *fSettings = 0,
                      IcyBuddies *fBuddies = 0);
        ~AccountDialog();

    protected:
        void changeEvent(QEvent *e);

    private:
        Ui::AccountDialog *ui;
        MainWindow *mainWindow;
        IcySettings *settings;
        IcyBuddies *buddies;
        QList<IcyAccount > accounts;
        int *iCount;

        void setupWindow();
        int findInAccs(const QString &sScreenName);

    private slots:
        void on_buttonBox_rejected();
        void on_buttonBox_accepted();
        void onIndexChanged(const int iIndex);
};

#endif // ACCOUNTDIALOG_H
